﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

using MakeIT.MiraPark.Negocios;
using Microsoft.Reporting.WinForms;

namespace MiraPark{

    public partial class FormReportCor : Form
    {
        public FormReportCor()
        {
            InitializeComponent();
        }

        private void FormTesteRelatorio_Load(object sender, EventArgs e)
        {
            this.BindingSource.DataSource = ModelBO.getCores();

            List<ReportParameter> rps = new List<ReportParameter>();
            ReportParameter rp = new ReportParameter("Empresa", ModelBO.getEmpresa(int.Parse(ModelBO.getParametro("Empresa Ativa"))).nome);
            rps.Add(rp);
            this.reportViewer1.LocalReport.SetParameters(rps);

            this.reportViewer1.RefreshReport();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}
